package com.dup.rulesdef;

import com.dup.factory.MatchAlgmsFactory;
import com.dup.interfaces.MatchEx;

public class RulesControllerMatchEx {

	public void getMatch(String oldStr, String newStr, String[] rules){
		
		for(int i = 0; i < rules.length; i++){
			MatchEx m = MatchAlgmsFactory.getMatchInstance(rules[i]);
			if(m != null){
			m.machWithWord(oldStr, newStr);
			if (!MatchAlgmsFactory.getMsg().equals(""))
				System.out.println(MatchAlgmsFactory.getMsg());
			else
				System.out.println("Not Match");
			MatchAlgmsFactory.setMsg("");
			}
		}
	}
}
